Skip to content

Convert msgspec schemas to Schema.from_dict format#929

Draft
ahal wants to merge 8 commits intotaskcluster:mainfrom
ahal:ahal/push-xpqpvswlroun
Draft

Convert msgspec schemas to Schema.from_dict format#929
ahal wants to merge 8 commits intotaskcluster:mainfrom
ahal:ahal/push-xpqpvswlroun

Conversation

@ahal
Copy link
Copy Markdown
Collaborator

@ahal ahal commented Apr 8, 2026

Msgspec is awesome, but the new class based method of defining schemas is clunky and more importantly, doesn't support kebab case (dashes in the key name).

This means users need to mentally translate _ in the schema to - in the task. It's also not possible to have a mix of underscores and dashes (which is probably a good thing.. but sometimes you want to forward subsections of a task definition to systems out of your control).

@ahal ahal self-assigned this Apr 8, 2026
@ahal
Copy link
Copy Markdown
Collaborator Author

ahal commented Apr 8, 2026

This isn't ready for review yet, but posting it for early feedback as I need to focus on other things for now.

# Information for indexing this build so its artifacts can be discovered.
"index": (IndexSchema, None),
# Whether this image should be cached based on inputs.
"cache": (bool, None),
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: these should be using Optional

@ahal ahal force-pushed the ahal/push-xpqpvswlroun branch from b9d4a44 to 4b61b91 Compare April 12, 2026 17:36
@ahal ahal force-pushed the ahal/push-xpqpvswlroun branch from 4b61b91 to b3fad09 Compare April 29, 2026 17:40
@ahal ahal changed the title Support defining msgspec schemas as dicts Convert msgspec schemas to Schema.from_dict format Apr 29, 2026
@ahal ahal force-pushed the ahal/push-xpqpvswlroun branch from b3fad09 to d510d08 Compare April 29, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant